<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "tmall1.spec_value".
 *
 * @property string $id
 * @property string $spec_id
 * @property string $name
 * @property string $img
 * @property string $train
 */
class SpecValue extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tmall1.spec_value';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['spec_id', 'train'], 'integer'],
            [['name', 'img'], 'required'],
            [['name'], 'string', 'max' => 50],
            [['img'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'spec_id' => 'Spec ID',
            'name' => 'Name',
            'img' => 'Img',
            'train' => 'Train',
        ];
    }
}
